<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
    <link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
    <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
    <div style="margin:0 auto;padding:20px;">
        <form class="layui-form" action="" id="showForm" autocomplete="off">

        </form>
    </div>

    <script type="text/x-handlebars-template" id="showBaseTemplate">
        {{#bean}}
        <div class="layui-form-item layui-col-xs12">
            <span class="hr-title">基础信息</span><hr>
        </div>
        <div class="layui-form-item layui-col-xs12">
            <label class="layui-form-label">数据库名称<i class="red">*</i></label>
            <div class="layui-input-block">
                <input type="text" id="name" name="name" win-verify="required" placeholder="数据库名称" class="layui-input" maxlength="100" value="{{name}}"/>
            </div>
        </div>
        <div class="layui-form-item layui-col-xs12">
            <label class="layui-form-label">连接串<i class="red">*</i></label>
            <div class="layui-input-block">
                <input type="text" id="jdbcUrl" name="jdbcUrl" win-verify="required" placeholder="请输入连接字符串" class="layui-input" maxlength="200" value="{{jdbcUrl}}"/>
            </div>
        </div>
        <div class="layui-form-item layui-col-xs6">
            <label class="layui-form-label">用户名<i class="red">*</i></label>
            <div class="layui-input-block">
                <input type="text" id="user" name="user" win-verify="required" placeholder="请输入用户名" class="layui-input" maxlength="100" value="{{user}}"/>
            </div>
        </div>
        <div class="layui-form-item layui-col-xs6">
            <label class="layui-form-label">密码</label>
            <div class="layui-input-block">
                <input type="text" id="password" name="password" placeholder="请输入密码" class="layui-input" maxlength="100" value="{{password}}"/>
            </div>
        </div>
        <div class="layui-form-item layui-col-xs6">
            <label class="layui-form-label">数据源<i class="red">*</i></label>
            <div class="layui-input-block">
                <select id="dataType" name="dataType" lay-search win-verify="required">

                </select>
            </div>
        </div>
        <div class="layui-form-item layui-col-xs6">
            <label class="layui-form-label">连接池<i class="red">*</i></label>
            <div class="layui-input-block">
                <select id="poolClass" name="poolClass" lay-search win-verify="required" lay-filter="poolClass">

                </select>
            </div>
        </div>
        <div class="layui-form-item layui-col-xs12">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea id="comment" name="comment" placeholder="请输入备注" maxlength="200" class="layui-textarea" style="height: 100px;">{{comment}}</textarea>
            </div>
        </div>
        <div class="layui-form-item layui-col-xs12">
            <span class="hr-title">配置选项</span><hr>
        </div>
        <div class="layui-form-item layui-col-xs12">
            <label class="layui-form-label">配置选项：</label>
            <div class="layui-input-block">
                <div class="winui-toolbar">
                    <div class="winui-tool" style="text-align: left;">
                        <button id="addRow" class="winui-toolbtn" type="button"><i class="fa fa-plus" aria-hidden="true"></i>新增行</button>
                        <button id="deleteRow" class="winui-toolbtn" type="button"><i class="fa fa-trash-o" aria-hidden="true"></i>删除行</button>
                    </div>
                </div>
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;"></th>
                        <th style="width: 150px;">配置项<i class="red">*</i></th>
                        <th style="width: 150px;">配置值</th>
                        <th style="width: 200px;">备注</th>
                    </tr>
                    </thead>
                    <tbody id="useTable" class="insurance-table">
                    </tbody>
                </table>
            </div>
        </div>

        <div class="layui-form-item layui-col-xs12">
            <div class="layui-input-block">
                <button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
                <button class="winui-btn" lay-submit lay-filter="testConnection">连接测试</button>
                <button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
            </div>
        </div>
        {{/bean}}
    </script>

    <!-- usetableTemplate -->
    <script type="text/x-handlebars-template" id="usetableTemplate">
        <tr trcusid="{{trId}}">
            <td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td>
            <td><input type="text" class="layui-input" id="{{configKey}}" win-verify="required"/></td>
            <td><input type="text" class="layui-input" id="{{configValue}}"/></td>
            <td><input type="text" class="layui-input" id="{{remark}}"/></td>
        </tr>
    </script>

    <script src="../../assets/lib/layui/layui.js"></script>
    <script src="../../assets/lib/layui/custom.js"></script>
    <script type="text/javascript">
        layui.config({base: '../../js/reportDataBase/'}).use('reportDataBaseEdit');
    </script>
</body>
</html>